package com.wqt;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;

public class LinkedListDemo {
    public static void main(String[] args) {


        LinkedList<String> list= new LinkedList<>();
        list.add("zhangsan");
        list.add("lisi");
        list.add("wangwu");
        list.add("zhaoliu");
        System.out.println(list.getFirst());
        System.out.println(list.getLast());
        System.out.println(list.getFirst()==list.remove());
        System.out.println(list.removeLast());
    }
}
